

#pragma once

#include "config/parameter_group.h"
#include "drivers/io_types.h"
#include "common/utils.h"

#define STATUS_LED_NUMBER 5


#define LED0_TOGGLE              ledToggle(0)
#define LED0_OFF                 ledSet(0, false)
#define LED0_ON                  ledSet(0, true)

#define LED1_TOGGLE              ledToggle(1)
#define LED1_OFF                 ledSet(1, false)
#define LED1_ON                  ledSet(1, true)

#define LED2_TOGGLE              ledToggle(2)
#define LED2_OFF                 ledSet(2, false)
#define LED2_ON                  ledSet(2, true)
#ifdef I_AM_REMOTE_CONTROLLER
#define LED3_TOGGLE              
#define LED3_OFF                 
#define LED3_ON                  

#define LED4_TOGGLE              
#define LED4_OFF                 
#define LED4_ON                  
#else

#ifdef LED3_PIN
    #define LED3_TOGGLE              ledToggle(3)
    #define LED3_OFF                 ledSet(3, false)
    #define LED3_ON                  ledSet(3, true)
#endif
#ifdef LED4_PIN
    #define LED4_TOGGLE              ledToggle(4)
    #define LED4_OFF                 ledSet(4, false)
    #define LED4_ON                  ledSet(4, true)
#endif

#endif

void ledInit();
void ledToggle(int led);
void ledSet(int led, bool state);
